<extend name="public@base5"/>
<block name="head">
    <link rel="stylesheet" href="__STATIC__/css/mall.css?v={$_static_version}"></link>
    <include file="theme/functions"/>
</block>
<block name="scripts">
    <include file="theme/scripts"/>
</block>
<block name="main">
    <div class="wrap js-check-wrap">
        <ul class="nav nav-tabs">
            <li class="nav-item">
                <a class="nav-link" href="{:url('OpSetting/avatar')}">默认昵称/头像管理</a>
            </li>
            <li class="nav-item">
                <a class="nav-link active">默认昵称/头像编辑</a>
            </li>
        </ul>
        <form class="js-ajax-form margin-top-20 col-sm-6" action="{:url('OpSetting/addAvatarPost')}" method="post">
            <div class="row mb-3">
                <label for="input-name" class="col-sm-2 col-form-label text-sm-end">所属性别</label>
                <div class="col-md-8 col-sm-10" style="padding-top: 7px;">
                    <input type="text" class="form-control" name="post_sex" value="{$sex}" hidden>
                    {$sex == 'male' ? '男' : '女'}
                </div>
            </div>
            <div class="row mb-3">
                <label for="input-name" class="col-sm-2 col-form-label text-sm-end">默认昵称</label>
                <div class="col-md-8 col-sm-10">
                    <input type="text" class="form-control" id="input-name" name="post_nick" value="{$nick}">
                    <small class="text-muted">{:lang('SETTING_DEFAULT_NICK_FORMAT')}</small>         
                </div>
            </div>
            <div class="row mb-3">
                <label for="input-remark"
                       class="col-sm-2 col-form-label text-sm-end">默认头像</label>
                <div class="col-md-8 col-sm-10">


                    {:_parse_vars($avatar_item, 'mall')}
                    <small class="text-muted">{:lang('UPLOAD_SINGLE_IMAGE_FORMAT_2MB')}</small>         
                </div>
            </div>
            <div class="row mb-3">
                <div class="offset-md-2 col-sm-10">
                    <button type="submit" class="btn btn-primary js-ajax-submit">
                        <i class="fa fa-save fa-fw"></i> {:lang('SAVE')}
                    </button>
                    <a class="btn btn-secondary" href="{:url('admin/OpSetting/avatar')}">{:lang('BACK')}</a>
                </div>
            </div>
        </form>
    </div>
</block>
